package com.vg.kd.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
import com.vg.kd.entity.PartEntity;
import com.vg.kd.entity.PartTmpEntity;
 

@RestController
@RequestMapping("/part")
public class PartController {
	
	
	@GetMapping("/query")
	 public IPage<PartEntity> QueryPart(Page page){
/*		PartEntity part=new PartEntity();
		part.selectPage(page, new Querywrapper<PartEntity>())*/
		
	/*	 return user.selectPage(new Page<User>(0, 12), null);*/
		return null;
	}
	
	/**  *  ：http://localhost:8080/part/query2?size=1&current=1<br>
	 * 
	 * @param page
	 * @return
	 */
	@GetMapping("/query2")
	public IPage<PartTmpEntity> QueryPartTmp(Page page){
		PartTmpEntity  parttmp=new PartTmpEntity();
	  System.out.println(page);
	  
		  return parttmp.selectPage(page, null); 
	}
	
	@GetMapping("/test")
	public String test() {
		return "<h1>Hello World!</h1>";
	}

}
